package java9_1;

/**
 * @author oldliu
 * @since 1.0
 */
public class Submarine implements Swimming {
    private String bianhao;
    public Submarine(String b){
        this.bianhao=b;
    }
    @Override
    public void swim() {
        System.out.println(bianhao+"号潜艇正在水中巡游！");
    }

    @Override
    public String toString() {
        return "这是一艘潜艇，编号是"+bianhao;
    }
}
